use "C:\Work\Research\Alliance\escexp\MintzRussett\Leeds2004.dta", clear

heckprob multinit capprop dendyt2d ofndyt1d targjoin, select (disdum=jdem contig capprop swtglo dndyns2d ofndyt1d neuto1d) nolog
predict minipre2, p11
replace ofndyt1d=1
predict mini2of, p11
replace ofndyt1d=0
predict mini2nof, p11
sum multinit minipre2 mini2of mini2nof
replace ofndyt1d=offense

predict minipre3, pcond
replace ofndyt1d=1
predict mini3of, pcond
replace ofndyt1d=0
predict mini3nof, pcond
sum multinit minipre3 mini3of mini3nof
replace ofndyt1d=offense

heckprob multtarg capprop dendyt2d ofndyt1d neuto1d initjoin, select (disdum=jdem contig capprop swtglo dndyns2d ofndyt1d neuto1d) nolog
predict mtarpre2, p11
replace dendyt2d=1
replace dndyns2d=1
predict mtar2df, p11
replace dendyt2d=0
replace dndyns2d=0
predict mtar2ndf, p11
sum multtarg mtarpre2 mtar2df mtar2ndf
replace dendyt2d=defense
replace dndyns2d=defnosec

replace neuto1d=1
predict mtar2ne, p11
replace neuto1d=0
predict mtar2nne, p11
sum multtarg mtarpre2 mtar2ne mtar2nne
replace neuto1d=neutral

predict mtarpre3, pcond
replace dendyt2d=1
replace dndyns2d=1
predict mtar3df, pcond
replace dendyt2d=0
replace dndyns2d=0
predict mtar3ndf, pcond
sum multtarg mtarpre3 mtar3df mtar3ndf
replace dendyt2d=defense
replace dndyns2d=defnosec

replace neuto1d=1
predict mtar3ne, pcond
replace neuto1d=0
predict mtar3nne, pcond
sum multtarg mtarpre3 mtar3ne mtar3nne
replace neuto1d=neutral


heckprob war jdem capdif dendyt2d ofndyt1d neuto1d, select (disdum=jdem contig capprop swtglo dendyt2d ofndyt1d neuto1d) nolog
predict warpre3, p11
replace dendyt2d=1
predict wardef2, p11
replace dendyt2d=0
predict warnodf2, p11
replace dendyt2d=defense
replace ofndyt1d=1
predict waroff2, p11
replace ofndyt1d=0
predict warnoof2, p11
replace ofndyt1d=offense
replace neuto1d=1
predict warneu2, p11
replace neuto1d=0
predict warnone2, p11
replace neuto1d=neutral

sum war warpre3 wardef2 warnodf2 waroff2 warnoof2 warneu2 warnone2


heckprob war jdem capdif bidisp, select (disdum=jdem contig capprop swtglo dendyt2d ofndyt1d neuto1d) nolog
predict warpre4, pcond
replace bidisp=1
predict warbi2, pcond
replace bidisp=0
predict warnobi2, pcond
replace bidisp=bilat

sum war warpre4 warbi2 warnobi2
